<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>心理咨询平台</title>
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, target-densityDpi=device-dpi"> -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">

    <c:set var="ctx" value="${pageContext.request.contextPath}" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="${ctx}/assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="${ctx}/assets/css/index.css?v=2.3">
    <script src="${ctx}/assets/js/myAlert.js"></script>
	<script>
    var signUrl2=location.href.split('#')[0];
	if(signUrl2.indexOf("isappinstalled")>0){
		signUrl2=signUrl2.split('?')[0];
		location.href=signUrl2;
	}
    </script>
    <style>
        ::-webkit-input-placeholder {
            color: #FFFFFF;
            text-align: center;
        }
    </style>
</head>
<body class="login-bg">

<section class="" id="amz-main" data-tag="css-nav">

    <div class="am-text-center login-img margin-top-50">
        <img src="${ctx}/assets/images/icon/logo.png">
    </div>

    <div class="am-g  margin-top-50 font-14 bd-login" >
        <div class="am-u-sm-12  ">
            <div class="bd-login-div ">
<i class="icon_07_3"></i>
                <input type="tel" class="" id="tel"  placeholder="请输入您的手机号">
            </div>
        </div>

        <div class="am-u-sm-12   " >
            <div class="bd-login-div  " >
                <i class="icon_10_3"></i>
                <input type="password" class=""  id="password" placeholder="6-20位数字或字母">
            </div>
        </div>

        <div class="am-u-sm-12 am-margin-top-lg am-text-center">
           <div class="btn-22">登录</div>
        </div>
        <div class="am-u-sm-6 border-right-2 am-text-right "><a href="updatePaswd.jsp"><span class="font-color-white">忘记密码</span></a></div>
        <div class="am-u-sm-6"><a href="regCounselor.jsp"><span class="font-color-white">注册申请</span></a></div>
    </div>

</section>

<script src="${ctx}/assets/js/jquery.min.js"></script>
<script src="${ctx}/assets/js/amazeui.min.js"></script>
<script>
	$(".btn-22").on("click", function () {
		var tel=$("#tel").val();
		var password=$("#password").val();
		if(tel=="" || password==""){
			myAlert("请输入电话号码和密码");
			return false;
		}
		var baseStr=$.ajax({url:"${ctx}/gotoMyCounse?tel="+tel+"&password="+password,async:false});
        var baseJson=JSON.parse(baseStr.responseText);
		if(baseJson.resultCode=="0"){
			location.href="myCounse.jsp";
		}else{
			myAlert(baseJson.resultDesc);
		}
	});
</script>

</body>
</html>